-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Get the EVM address for a given Farcaster User #114
Conversation
@Sneh1999 can you share where in the Farcaster spec those are specified. Also how they are used. In particular I am curios to understand from where the Request is coming from. |
I found this about verifications in the protocol docs Custody address is used to check if a given message is valid or not. A FID is connected to a custody address. Verified address on the other hand can be multiple like |
fid: number, | ||
options?: GetFarcasterUserAddressOptions, | ||
): Promise<GetFarcasterUserAddressResponse | null> { | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sneh1999 side not for the next PR, large try/catch are a bad practice in Javascript, as each Try/Catch will hold on memory almost everything inside a try
till the end of the execution. It's advice to have smaller try/catch.
options?: GetFarcasterUserAddressOptions, | ||
): Promise<GetFarcasterUserAddressResponse | null> { | ||
try { | ||
const hasCustodyAddresses = options?.hasCustodyAddresses ?? true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasCustodyAddresses
@Sneh1999 did you mentioned there can be only one address for custody?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why not hasCustodyAddress
as singular?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niiiice!!!!
Great work @Sneh1999
What changed? Why?
Ability to extract the EVM address for a given Farcaster user
It gives the client ability to either get the verified address or the custody address
Notes to reviewers
How has it been tested?
yarn test
yarn integration:test